package com.books4sale.feed.atom;

import java.io.IOException;

import org.restlet.ext.atom.Feed;
import org.restlet.ext.xml.XmlWriter;
import org.xml.sax.SAXException;

public class MyFeed extends Feed {

	@Override
	public void write(XmlWriter writer) throws IOException {
		try {
			writer.setPrefix(ATOM_NAMESPACE, "");
			writer.setDataFormat(true);
			writer.setIndentStep(3);
			writer.reset();
			// writer.startDocument();
			writeElement(writer);
			writer.endDocument();
		} catch (SAXException e) {
			IOException ioe = new IOException(
					"Unable to write the Atom feed document.");
			ioe.initCause(e);
			throw ioe;
		}
	}
}